package asteroids.model.programs.unaryexpression;

import asteroids.model.programs.Expression;
import asteroids.model.programs.Program;
import exception.IllegalOperandException;

public class Negation extends UnaryExpression<Double> {

	public Negation(Expression<?> operand) throws IllegalOperandException {
		super(operand);
	}

	@Override
	public Double getValue(Program program) {
		return -(Double)(getOperand().getValue(program));
	}



}
